/* 
  Copyright (c) [2019] Bangjie Deng
  FChaseSolver is licensed under the Mulan PSL v1.
  You can use this software according to the terms and conditions of the Mulan PSL v1.
  You may obtain a copy of Mulan PSL v1 at:
  http://license.coscl.org.cn/MulanPSL
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
  PURPOSE.
  See the Mulan PSL v1 for more details.
*/
//
// Created by Bangjie Deng on 10/3/19.
//


#include <vector>
#include "FChaseSolver.h"
#include "iostream"
#include "cassert"

int main() {

    int n = 4;

    std::vector<float> a = {1., 1., 1.};
    std::vector<float> b = {1, 2, 3, 4};
    std::vector<float> c = {1, 1, 1};
    std::vector<float> d = {3, 8, 15, 19};
    auto x = std::vector<float>(n);

    ccs_idep(&x[0], n, &a[0], &b[0], &c[0], &d[0]);

    printf("The solution should be [1., 2., 3., 4.]\n");
    printf("%f %f %f %f\n", x[0], x[1], x[2], x[3]);

    assert(x[0] == 1.f);
    assert(x[1] == 2.f);
    assert(x[2] == 3.f);
    assert(x[3] == 4.f);

}
